package com.itany.ems.service;

import com.itany.ems.entity.Emp;
import com.itany.ems.exception.RequestParameterErrorException;
import com.itany.ems.exception.ServiceException;

import java.util.List;

/**
 * Author:shixiaojun@itany.com
 * Date:2022/3/3 13:58
 * Version:1.0-SNAPSHOT
 */
public interface EmpService {

    /**
     * 添加员工信息
     * @param name
     * @param salary
     * @param gender
     * @param edu
     * @param hobbies
     */
    public void addEmp(String name,String salary,String gender,String edu,String[] hobbies) throws RequestParameterErrorException, ServiceException;

    /**
     * 查询所有员工信息
     * @return
     */
    public List<Emp> findAll() throws ServiceException;

    /**
     * 修改设置默认值
     * @param id
     * @return
     */
    public Emp findById(String id) throws RequestParameterErrorException, ServiceException;

    /**
     * 修改指定的员工信息
     * @param id
     * @param name
     * @param salary
     * @param gender
     * @param edu
     * @param hobbies
     */
    public void modifyEmp(String id,String name,String salary,String gender,String edu,String[] hobbies) throws RequestParameterErrorException, ServiceException;

    /**
     * 删除指定员工信息
     * @param id
     */
    public void removeEmp(String id) throws RequestParameterErrorException, ServiceException;
}
